from django.conf.urls.defaults import *

import settings

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Example:
    # (r'^vika/', include('vika.foo.urls')),

    # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
    # to INSTALLED_APPS to enable admin documentation:
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    (r'^admin/', include(admin.site.urls)),
    
    (r'^static/(?P<path>.*)$', 'django.views.static.serve',{'document_root': settings.STATIC_PATH}),
    (r'^media/(?P<path>.*)$', 'django.views.static.serve',{'document_root': settings.MEDIA_ROOT}),

    (r'^$','django.views.generic.simple.redirect_to',{'url':'/login/'}),
    
    url(r'^signup/$', 'vika.meal.views.signup', name="acct_signup"),
    url(r'^login/$', 'vika.meal.views.login', name="acct_login"),
    url(r'^logout/$', 'django.contrib.auth.views.logout_then_login', name="acct_logout_and_login"),
    url(r'^set_order/(?P<course_id>\d+)$', 'vika.meal.views.set_order', name='set_order'),
    url(r'^del_order/(?P<order_id>\d+)$', 'vika.meal.views.del_order', name='del_order'),
    url(r'^check_order/$', 'vika.meal.views.check_order', name='check_order'),
    url(r'^resta_course/(?P<resta_id>\d+)$', 'vika.meal.views.rest_courses', name='rest_courses'),
    
    url(r'^today_order/$', 'vika.meal.views.today_order', name='today_order'),
    
    url(r'^order_prefs/$', 'vika.meal.views.order_prefs', name='order_prefs'),
    
    url(r'^guestbook/$', 'vika.meal.views.guestbook', name='guestbook'),
)
